package com.atguigu.behavior.observer;

public class BaiduWeather implements Observer{
    private Double temperature;
    private Double pressure;
    private Double humidty;

    @Override
    public void update(Double temperature, Double pressure, Double humidty) {
        this.temperature=temperature;
        this.pressure=pressure;
        this.humidty=humidty;
    }

    @Override
    public void display() {
        System.out.println("="+this.getClass().getSimpleName()+":temperature:"+this.temperature+"=");
        System.out.println("="+this.getClass().getSimpleName()+":pressure:"+this.pressure+"=");
        System.out.println("="+this.getClass().getSimpleName()+":humidty:"+this.humidty+"=");
    }
}
